#include "yocto/utest/run.hpp"
#include "kernel/library.hpp"

#include "yocto/ios/ocstream.hpp"
#include "yocto/lua/lua-state.hpp"
#include "yocto/lua/lua-config.hpp"

using namespace yocto;


YOCTO_UNIT_TEST_IMPL(species)
{
	if( argc <= 1 )
		throw exception("%s: need script.lua", argv[0] );
	Library    lib;
	Lua::State VM;
	lua_State *L = VM();
	Lua::Config::DoFile( L, argv[1] );
	lib.load(L,"library");
	for( size_t i=1; i <= lib.size(); ++i )
	{
		std::cerr << lib(i).name << std::endl;
	}
}
YOCTO_UNIT_TEST_DONE()
